﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>hello world</title>
	<meta charset="utf-8" />
	<link href="../lib/highlight/default.css" rel="stylesheet" />
	<script src="../lib/highlight.js"></script>
	<script src="../lib/Promise.js"></script>
	<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
	<div id="console" style="border:1px solid #ddd; padding:20px; border-radius:20px;"></div>
	<script>
		var console = {
			log : function(msg){
				var div = document.createElement("div");
				div.innerText = msg;
				document.getElementById("console").appendChild(div);
			}
		}
	</script>
	<script>
new Promise(function(resolve, reject){
	reject("hello");
}).then(function(result){
	console.log("resolve");
}, function(error){
	console.log("Error: " + error);
});
	</script>

<pre><code class="javascript">
new Promise(function(resolve, reject){
	reject("hello");
}).then(function(result){
	console.log("resolve");
}, function(error){
	console.log("Error: " + error);
});
</code></pre>
	

	
</body>
</html>
